﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Chemistry.Models;
using Chemistry.Tools;
using GalaSoft.MvvmLight.Command;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace Chemistry.ViewModels
{
    /// <summary>
    /// 导航界面vm
    /// </summary>
    public class GuideViewModel:VmBase
    {
        private string _title;
        /// <summary>
        /// 标题
        /// </summary>
        public string Title
        {
            get { return _title; }
            set { _title = value; RaisePropertyChanged("Title"); }
        }

        private string _k3common1;

        public string K3Common1
        {
            get { return _k3common1; }
            set { _k3common1 = value; RaisePropertyChanged("K3Common1"); }
        }
        private string _k3common2;

        public string K3Common2
        {
            get { return _k3common2; }
            set { _k3common2 = value; RaisePropertyChanged("K3Common2"); }
        }

        private string _k4common1;

        public string K4Common1
        {
            get { return _k4common1; }
            set { _k4common1 = value; RaisePropertyChanged("K4Common1"); }
        }

        private string _k4common2;

        public string K4Common2
        {
            get { return _k4common2; }
            set { _k4common2 = value; RaisePropertyChanged("K4Common2"); }
        }

        private string _k3specislText;

        public string K3SpecialText
        {
            get { return _k3specislText; }
            set { _k3specislText = value; RaisePropertyChanged("K3SpecialText"); }
        }

        private string _k4specialtext;

        public string K4SpecialText
        {
            get { return _k4specialtext; }
            set { _k4specialtext = value; RaisePropertyChanged("K4SpecialText"); }
        }

        public RelayCommand<string> SpecialExam { get; set; }

        public GuideViewModel()
        {
            SpecialExam = new RelayCommand<string>(SpecialExamExec);
            var guideModel = Tools.Tool. GetGuideConfigModel();
            InitProperty(guideModel);

            InitMessage();
        }

        private void InitMessage()
        {
        }

        private void SpecialExamExec(string type)
        {
            bool isInner = type == "in";
            Send<bool>(isInner, MessageToken.ShowEquipmentWindow);
        }

        private void InitProperty(GuideConfigModel guideModel)
        {
            this.Title = guideModel.flow + "作业实操科目";
            //this.K3SpecialText = "待考";
            //this.K4SpecialText = "待考";
        }

    }
}
